package com.smh.a04objectStreamDemo1;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class ObjectStreamDemo1 {
    public static void main(String[] args) throws IOException {
        //序列化流
        Student student = new Student("zhangsan", 11, "nan", "zhongguo");

        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("day27-code\\file\\demo2\\a.txt"));

        oos.writeObject(student);
        oos.close();


    }
}
